package com.ihg.hiex.admin.service.session;

import java.util.List;
import java.util.Map;

import com.demo2do.core.entity.page.Page;
import com.ihg.hiex.admin.entity.search.SessionReportSearch;
import com.ihg.hiex.admin.entity.security.Login;
import com.ihg.hiex.admin.entity.session.FacilitatorConferenceRoom;
import com.ihg.hiex.admin.service.DataService;
import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.session.SessionAttribute;
import com.ihg.hiex.entity.session.Status;
import com.ihg.hiex.entity.session.after.SessionReport;
import com.ihg.hiex.entity.session.event.SessionEvent;
import com.ihg.hiex.entity.session.meeting.SessionMeeting;
import com.ihg.hiex.entity.session.meeting.Target;
import com.ihg.hiex.entity.session.participator.SessionFacilitator;
import com.ihg.hiex.entity.session.participator.SessionParticipator;
import com.ihg.hiex.entity.session.participator.Type;
import com.ihg.hiex.entity.session.task.SessionTask;
import com.ihg.hiex.entity.user.Administrator;
import com.ihg.hiex.entity.user.Assessor;
import com.ihg.hiex.entity.user.Delegate;

/**
 * @author Guangli Yan
 *        
 */
public interface SessionService extends DataService<Session> {
    
    /**
     * @param status
     * @return
     */
    public int count(Status status);
    
    /**
     * 
     * @param login
     * @param status
     * @return
     */
    public int count(Login login, Status status);
    
    /**
     * 
     * @param login
     * @return
     */
    public int count(Login login);
    
    /**
     * 
     * @param status
     * @param page
     * @return
     */
    public List<Session> list(Status status, Page page);
    
    /**
     * 
     * @param login
     * @param status
     * @param page
     * @return
     */
    public List<Session> list(Login login, Status status, Page page);
    
    /**
     * 
     * @param status
     * @return
     */
    public List<Session> list(Status status);
    
    /**
     * 
     * @param status
     * @param administrator
     * @return
     */
    public List<Session> list(Status status, Administrator administrator);
    
    /**
     * 
     * @param status
     * @param assessor
     * @return
     */
    public List<Session> list(Status status, Assessor assessor);
    
    /**
     * 
     * @param status
     * @param delegate
     * @return
     */
    public List<Session> list(Status status, Delegate delegate);
    
    /**
     * 
     * @param login
     * @param page
     * @return
     */
    public List<Session> list(Login login, Page page);
    
    /**
     * 
     * @param administrator
     * @return
     */
    public List<Session> list(Administrator administrator);
    
    /**
     * 
     * @param delegates
     * @return
     */
    public List<Session> list(List<Delegate> delegates);
    
    /**
     * 
     * @param session
     * @param names
     * @return
     */
    public Map<String, SessionAttribute> listSessionAttribute(Session session, String[] names);
    
    /**
     * 
     * @param sessions
     * @param names
     * @return
     */
    public Map<String, Map<String, SessionAttribute>> listSessionAttribute(List<Session> sessions, String[] names);
    
    /**
     * 
     * @param search
     * @return
     */
    public Map<String, Map<String, SessionReport>> searchSessionReport(SessionReportSearch search);
    
    /**
     * 
     * @param sessionId
     * @return
     */
    public Session load(Long sessionId);
    
    /**
     * 
     * @param session
     * @param taskName
     * @return
     */
    public SessionTask loadSessionTask(Session session, String taskName);
    
    /**
     * create session
     * 
     * @param session
     * @param assessors
     * @param delegates
     * @param assessorWechatGroup
     * @param delegateWechatGroup
     * @param operatorId
     * @param operator
     */
    public void create(Session session, List<Assessor> assessors, List<Delegate> delegates, String assessorWechatGroup, String delegateWechatGroup, Long operatorId, String operator);
    
    /**
     * 
     * @param session
     * @param assessors
     * @param delegates
     * @param operatorId
     * @param operator
     */
    public void reUpload(Session session, List<Assessor> assessors, List<Delegate> delegates, Long operatorId, String operator);
    
    /**
     * 
     * @param session
     * @param operatorId
     * @param operator
     */
    public void start(Session session, Long operatorId, String operator);
    
    /**
     * 
     * @param session
     * @param operatorId
     * @param operator
     */
    public void delete(Session session, Long operatorId, String operator);
    
    /**
     * 
     * @param session
     * @param operatorId
     * @param operator
     */
    public void close(Session session, Long operatorId, String operator);
    
    /**
     * 
     * @param session
     * @param operatorId
     * @param operator
     */
    public void edit(Session session, Long operatorId, String operator);
    
    /**
     * 
     * @param session
     * @param operatorId
     * @param operator
     */
    public void openNotice(Session session, Long operatorId, String operator);
    
    /**
     * 
     * @param session
     * @param subSession
     * @return
     */
    public Map<String, List<SessionParticipator>> listParticipator(Session session, String subSession);
    
    /**
     * @param session
     * @param subSession
     * @return
     */
    public Map<String, List<SessionParticipator>> listSortParticipator(Session session, String subSession);
    
    /**
     * 
     * @param session
     * @param assessorId
     */
    public void assessorRemove(Session session, Long assessorId);
    
    /**
     * 
     * @param session
     * @param delegateId
     */
    public void delegateRemove(Session session, Long delegateId);
    
    /**
     * 
     * @param session
     * @param assessor
     * @param subSession
     * @param subGroup
     * @param seats
     */
    public void addAssessor(Session session, Assessor assessor, String subSession, String subGroup, String[] seats);
    
    /**
     * 
     * @param session
     * @param delegate
     * @param subSession
     * @param subGroup
     * @param seat
     */
    public void addDelegate(Session session, Delegate delegate, String subSession, String subGroup, String seat);
    
    /**
     * 
     * @param session
     * @param subSessionA
     * @param subSessionB
     */
    public void changeSubSession(Session session, String subSessionA, String subSessionB);
    
    /**
     * 
     * @param session
     * @param task
     * @param operatorId
     * @param operator
     */
    public void confirm(Session session, SessionTask task, Long operatorId, String operator);
    
    /**
     * @param session
     * @return
     */
    public List<SessionFacilitator> listFacilitator(Session session);
    
    /**
     * 
     * @param session
     * @return
     */
    public List<Assessor> listAssessor(Session session);
    
    /**
     * 
     * @param session
     * @return
     */
    public List<Delegate> listDelegate(Session session);
    
    /**
     * 
     * @param administrator
     * @return
     */
    public List<Delegate> listDelegate(Administrator administrator);
    
    /**
     * @param session
     * @param assessor
     * @return
     */
    public List<Delegate> listDelegate(Session session, Assessor assessor);
    
    /**
     * 
     * @param session
     * @param type
     * @return
     */
    public Map<String, Map<String, SessionTask>> listSessionTaks(Session session, Type type);
    
    /**
     * 
     * @param session
     * @param assessor
     * @param parent
     * @return
     */
    public List<SessionTask> listChildSessionTask(Session session, Assessor assessor, String parent);
    
    /**
     * 
     * @param session
     * @param parent
     * @param assessors
     * @return
     */
    public Map<Long, Long> listAssessorFinishTask(Session session, String parent, List<Assessor> assessors);
    
    /**
     * 
     * @param session
     * @param parent
     * @param delegates
     * @return
     */
    public Map<Long, Long> listDelegateFinishTask(Session session, String parent, List<Delegate> delegates);
    
    /**
     * 
     * @param session
     * @param name
     * @param type
     * @return
     */
    public List<SessionTask> listSessionTask(Session session, String name, Type type);
    
    /**
     * 
     * @param session
     * @param name
     * @return
     */
    public Map<String, SessionTask> listAssessorSessionTask(Session session, String name);
    
    /**
     * 
     * @param session
     * @param name
     * @return
     */
    public Map<String, SessionTask> listDelegateSessionTask(Session session, String name);
    
    /**
     * 
     * @param session
     * @return
     */
    public Map<String, Map<String, SessionMeeting>> listSessionMeeting(Session session);
    
    /**
     * 
     * @param meetingId
     * @return
     */
    public SessionMeeting loadSessionMeeting(Long meetingId);
    
    /**
     * 
     * @param session
     * @param name
     * @param target
     * @return
     */
    public SessionMeeting loadSessionMeeting(Session session, String name, Target target);
    
    /**
     * 
     * @param session
     * @param type
     * @return
     */
    public SessionEvent loadSessionEvent(Session session, com.ihg.hiex.entity.session.event.Type type);
    
    /**
     * 
     * @param sessionMeeting
     */
    public void editSessionMeeting(SessionMeeting sessionMeeting);
    
    /**
     * create session facilitator
     * 
     * @param session
     * @param facilitator
     * @param conferenceRoom
     */
    public void createFacilitator(Session session, SessionFacilitator facilitator, FacilitatorConferenceRoom conferenceRoom);
    
}